import request from '@/utils/request'
/*
	使用说明
	export const getList = data => request.get('/api/list', data, false)
							页面调用名  请求参数       请求类型  接口地址         loading是否显示
	页面中调用方法：（若无请求参数则留空,例：this.$api.getList()）
	this.$api.getList(params).then(res => {})
*/

//登陆
export const login = data => request.post('/login', data)
//获取用户信息
export const getInfo = data => request.get('/getInfo', data)
//获取验证码
export const getCodeImg = data => request.get('/captchaImage', data)
//获取菜单
export const routers = data => request.get('/getRouters', data)
//获取今日鸡汤
export const getWelcomeText = data => request.get('/welcomeText/today', data)


/*
	workbench.js
*/
//储运app首页扫码嫌详情
export const deepen_design_base_info = data => request.get(`/pdDeepenDesignBase/deepen_design_base_info/${data}`, )
//工作台的数据
export const applicationType = data => request.get('/getRouters?applicationType=mobile', data)
//扫码获取构件详情
export const component_detail = data => request.get('/invert/component_detail', data)
//退货管理保存
export const returnsave = data => request.post('/return/save', data)
//入库管理详情
export const scan_code_warehousing = data => request.get(`/warehousing/scan_code_warehousing/${data}`)
//构件详情
export const pdDeepenDesignComponentDetailDetail = data => request.get('/pdDeepenDesignComponentDetail/detailForApp',data)
//库存管理详情数据
export const warehousingstockstructure = data => request.get('/warehousing/stock-structure',data)
//维修管理详情
export const repairdetail = data => request.get(`/repair/scan_repair_detail/${data}`)
//退货入库管理详情
export const scan_code_returnHouseDetail = data => request.get('/shipmentReturnComponentProcess/componentProcessDetail',data)
//分包商分页领用班组
export const teampage = data => request.get('/team/page',data)
//项目查询
export const installProjectApproval = data => request.get('/projectApproval',data)
//获取项目列表下拉
export const projectApproval = data => request.get('/projectApproval?pageNum=1&pageSize=9999&approvalStatus=2',data)


/*
	user.js
*/
//生产运营我的未待办
export const todoList = data => request.get('/flowable/task/todoList', data)
//获取用户信息
export const userInfo = data => request.get('/getInfo', data)
//获取用户信息
export const systemUser = data => request.get('/system/user', data)
//物料名称
export const dict = data => request.get('/system/dict/data/list', data)
//获取视频流地址
export const getVideoUrlpage = data => request.get('/bdFileManage/page?businessType=47', data)
//获取版本的包
export const newVersion = data => request.get('/bdFileManage/page?businessType=', data)
//修改密码
export const updatePwd = data => request.put('/system/user/profile/updatePwd', data)
//生产运营我的发起
export const mineStartList = data => request.get('/flowable/task/mineStartList', data)
//生产运营我的已待办
export const finishedList = data => request.get('/flowable/task/finishedList', data)
//我的待办
export const upcoming = data => request.get('/index/upcoming', data)


/*
	person.js
*/
//生产运营我的未待办
export const getUpcoming = data => request.get('/index/upcoming', data)


/*
	commonFun.js
*/
//生产运营我的未待办
export const getCommonFun = data => request.get('/topMenu/my', data)
export const addCommonFun = data => request.post('/topMenu/my', data)


/*
	operation.js
*/
//获取分供商列表
export const subsupplier = data => request.get('/subsupplier', data)
//物资出库（价格）
export const pdMaterialOutWarehouseBasePriceAuthenticationDetail = data => request.get('/pdMaterialOutWarehouseBase/pdMaterialOutWarehouseBasePriceAuthenticationDetail', data)
//物资出库
export const pdMaterialOutWarehouseBaseAuthenticationSetDate = data => request.get('/pdMaterialOutWarehouseBase/pdMaterialOutWarehouseBaseAuthenticationSetDate', data)
//物资出库详情
export const pdMaterialOutWarehouseBaseAuthenticationDetail = data => request.get('/pdMaterialOutWarehouseBase/pdMaterialOutWarehouseBaseAuthenticationDetail', data)
//物资出库/退库分页
export const materialOutList = data => request.get('/pdMaterialOutWarehouseBase/page', data)
//保存
export const addOutbound = data => request.post('/pdMaterialOutWarehouseBase/addOutbound', data)
//更新物资出库
export const materialOutUpdate = data => request.post('/pdMaterialOutWarehouseBase/update', data)
//添加物资出库
export const materialOutAdd = data => request.post('/pdMaterialOutWarehouseBase/add', data)
//扫码获取领料单
export const addMaterialWarehouse = data => request.post('/pdMaterialOutWarehouseBase/addMaterialWarehouse', data)
//扫码获取领料单
export const ScnCollectDetail = data => request.get('/pdMaterialOutWarehouseBase/scanCodeAddByScheduling', data)
//编辑删除
export const deleteMaterial = data => request.post('/pdMaterialOutWarehouseBase/deleteMaterial', data)
//编辑详情
export const getMaterialDetailList = data => request.get(`/pdMaterialOutWarehouseBase/getMaterialDetailList/${data}` )
//物资出库详情
export const materialOutDetail = data => request.get(`/pdMaterialOutWarehouseBase/detail/${data}` )
//获取项目下拉
export const getProjectList = data => request.get('/projectApproval', data)
//获取物资编码确认
export const queryMaterialInfo = data => request.get('/pdMaterialOutWarehouseBase/queryMaterialInfo', data)
//获取物资编码
export const queryMaterialCodeList = data => request.get('/pdMaterialOutWarehouseBase/queryMaterialCodeList', data)
//获取流程
export const process_pull = data => request.get('/flowable/definition/process_pull', data)
//获取领料单
export const getCollectDetail = data => request.get('/scheduling/detailScheduling', data)


//definition.js
//获取审批记录
export const getApprovalRecords = data => request.get('/flowable/task/flowRecord', data)
//通过
export const postConfirmComplete = data => request.post('/flowable/task/complete', data)
//退回
export const postConfirmReturn = data => request.post('/flowable/task/return', data)
//驳回
export const getConfirmReject = data => request.post('/flowable/task/reject', data)
//获取可退回节点列表
export const getReturnList = data => request.post('/flowable/task/returnList', data)


//materialManagement.js
//物资进场/零星物资进场 根据id获取详情
export const queryApproachDetailById = data => request.get(`/pdMaterialEnterParkBase/detail/${data}`)
//物资总控 根据id获取详情
export const queryControlDetailById = data => request.get(`/pdMaterialControlBase/detail/${data}`)
//物资退场
export const queryExitDetailById = data => request.get(`/pdMaterialBackParkBase/detail/${data}`)
//物资出库
export const queryOutDetailById = data => request.get(`/pdMaterialOutWarehouseBase/detail/${data}`)
//获取分包商，分供商名称
export const querySubcontractorName = data => request.get(`/subsupplier/${data}`)
//物资退库
export const queryReturnDetailById = data => request.get(`/pdMaterialOutWarehouseBase/detail/${data}`)
//物资采购 根据id获取详情
export const queryPurchaseDetailById = data => request.get(`/pdMaterialPurchaseBase/detail/${data}`)
//物资库存 根据id获取详情
export const queryInventoryManageDetailById = data => request.get(`/pdMaterialInventoryManageBase/detail/${data}`)


//contract.js
// 物资成本后加（秦）
export const pdMaterialEnterParkBase = data => request.get(`/pdMaterialEnterParkBase/updateMaterialState/${data}`)
// 根据id获取标准合同列表
export const getContractTemplateById = data => request.get(`/contractTemplate/getById/${data}`)
// 根据id合同结算后加
export const updateBySettlement = data => request.get(`/subsupplierContractSettlement/updateBySettlement`)
// 根据id获取详情(新)
export const detailByContractInfo = data => request.get(`/subsupplierContractSettlement/detailByContractInfo/${data}`)
// 分包合同评审
export const subsupplierContractInfo = data => request.get(`/subsupplierContractInfo/${data}`)
// 分包合同评审管理、物资合同评审管理
// 根据id获取详情
export const getSubsupplierContractorInfoById = data => request.get(`/subsupplierContract/${data}`)
// 根据id获取详情(新)
export const getContractInfoById = data => request.get(`/subsupplierContractSupplementary/getContractInfoById/${data}`)
// 分包商管理、分供商管理
// 根据id获取详情
export const getContractorInfoById = data => request.get(`/subsupplier/${data}`)
// 获取历次合同、根据id获取补充协议评审详情
export const getHistoryContracts = data => request.get(`/subsupplierContractSupplementary`)
// 分包合同补充评审
export const subsupplierContractInfoUpdate = data => request.get(`/subsupplierContractInfo/update`)
// 获取标准合同列表
export const getContractTemplatePage = data => request.get(`/contractTemplate/list`)
// 获取物资，合同详情-根据id获取合同详情
export const subsupplierContractInfoGetById = data => request.get(`/subsupplierContractInfo/getById/${data}`)


//cost.js
export const getCostInfoById = data => request.get(`/cost/${data}`)


//funds.js
//资金计划-根据id获取详情
export const getFundInfoById = data => request.get(`/fundPlan/detail/${data}`)
//分包合同付款申请-根据id获取详情
export const getSubApplicationById = data => request.get(`/fbContractPayment/detail/${data}`)
//分供合同付款申请-根据id获取详情
export const getSplitApplicationById = data => request.get(`/fgContractPayment/detail/${data}`)


// performance.js
//履约合同管理/履约合同补充协议-根据id获取详情
export const getInfoById = data => request.get(`/pdLyContract/detail/${data}`)


//projectApproval.js
//根据id获取详情
export const projectGetInfoById = data => request.get(`/projectApproval/${data}`)